<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <script src="../jquery/jquery-3.2.1.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="../css/bootstrap.css">

</head>
<body>

<div class="container">
<pre>
    <h3>
        BootStrap中的对话框可以分为如下几个部分:
        class="modal"：对话框的最外层容器，可以控制对话框的显示与隐藏
        class="modal-dialog":对话框的第二层容器
        class="modal-content":对话框的第三层容器,控制对话框的边框、边距、背景、阴影效果。其又包括三个部分:
            class="modal-header":对话框的头部，包含标题，关闭按钮等。
            class="modal-body":  对话框的主体，是对话框的主要内容。
            class="modal-footer":对话框脚注，包含操作按钮等。
    </h3>
</pre>

    <button class="btn btn-primary" id="btn_open" data-target="#myModal" data-toggle="modal">点我(大)</button>
    <div class="modal fade " id="myModal">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">对话框</h4>
                </div>
                <div class="modal-body">
                    <p>弹出一个对话框</p>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button class="btn btn-primary">保存</button>
                </div>
            </div>
        </div>
    </div>
    <button class="btn btn-primary"  data-target="#myModal2" data-toggle="modal">点我(小)</button>
    <div class="modal fade " id="myModal2">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">对话框</h4>
                </div>
                <div class="modal-body">
                    <p>弹出一个对话框</p>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button class="btn btn-primary">保存</button>
                </div>
            </div>
        </div>
    </div>
    <h4>弹出框触发方式</h4>
    <button class="btn btn-success" data-toggle="modal" data-target="#myModal3">点我(button)</button>

    <div class="modal fade" id="myModal3">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button class="close" data-dismiss="modal">&times;</button>
                        <p class="modal-title">弹出框</p>
                    </div>
                    <div class="modal-body">
                        button方式
                    </div>
                    <div class="modal-footer">
                        <button class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button class="btn btn-primary">保存</button>
                    </div>
                </div>
            </div>
        </div>

    <a href="#myModal4" data-toggle="modal" class="btn btn-info">点我(a标签)</a>

    <div class="modal fade" id="myModal4">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal">&times;</button>
                    <p class="modal-title">弹出框</p>
                </div>
                <div class="modal-body">
                    <p>a方式</p>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button class="btn btn-primary">保存</button>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<!--<script>-->
    <!--$(function(){-->
        <!--$("#btn_open").click(function(){-->
            <!--$("#myModal").modal(-->
                <!--{-->
                    <!--backdrop:"static"-->
                <!--});-->
        <!--});-->
    <!--})-->
<!--</script>-->
</html>